package thread;

public class SleepDemo2 {
    public static void main(String[] args) {
      Thread lin =  new Thread(()->{
            try {
                System.out.println("lin aaa");
                Thread.sleep(10000000);
            } catch (InterruptedException e) {
                System.out.println("lin bbbb");
            }
            System.out.println("lin ccc");
        });
      lin.start();

        new Thread(()->{
            System.out.println("huang aaa");
            for (int i = 0; i < 5; ++i) {
                System.out.println("huang bbb");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {

                }
                }
            System.out.println("huang ccc");
            lin.interrupt();
        }).start();
    }
}
